#include"comment.h"

int main()
{
  umask(0);
  if(mkfifo(MY_FIFO,0666)!=0){
    perror("mkfifo");
    return 1;
  }
  //创建管道文件后，进行文件操作即可
  int fd =  open(MY_FIFO,O_RDONLY);
  while(1)
  {
    char buff[64] = {0};
    read(fd,buff, sizeof(buff)-1);
    printf("%s\n",buff);
    sleep(1);
  }
  return 0;
}
